import { Injectable } from '@angular/core';
import { Http } from '@angular/http';
import { ServiceBasic } from '../../kalend';

@Injectable()
export class RoleService extends ServiceBasic {
  constructor(http: Http) {
    super('/role', http);
  }

  query() {
    return this.httpget(`/query`);
  }

  create(doc: any) {
    return this.httppost(`/create`, doc);
  }
  delete(id: any) {
    return this.httpget(`/delete/${id}`);
  }
  queryById(id: any) {
    return this.httpget(`/queryById/${id}`);
  }
  update(doc: any) {
    return this.httppost(`/update`, doc);
  }
}
